package com.pzh.assignment.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author pengzhihao
 * @since 2022-04-06
 */
@Getter
@Setter
@TableName("role_menu")
@ApiModel(value = "RoleMenu对象", description = "")
public class RoleMenu implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("外键：菜单id")
    private Integer mId;

    @ApiModelProperty("外键：角色id")
    private Integer rId;

    public static RoleMenu valueOf(Integer menuId, Integer roleId){
        RoleMenu roleMenu = new RoleMenu();
        roleMenu.setMId(menuId);
        roleMenu.setRId(roleId);
        return roleMenu;
    }


}
